package com.ruoyi.hualian.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hualian.mapper.HlBandwidthMapper;
import com.ruoyi.hualian.domain.HlBandwidth;
import com.ruoyi.hualian.service.IHlBandwidthService;

/**
 * 带宽Service业务层处理
 * 
 * @author hujian
 */
@Service
public class HlBandwidthServiceImpl implements IHlBandwidthService 
{
    @Autowired
    private HlBandwidthMapper hlBandwidthMapper;

    /**
     * 根据集合插入数据库
     * @param hlBandwidths 集合
     * @return 结果
     */
    @Override
    public int insertList(List<HlBandwidth> hlBandwidths) {
        return hlBandwidthMapper.insertList(hlBandwidths);
    }

    /**
     * 根据已知信息查询具体对象信息
     * @param hlBandwidth 已知信息
     * @return 具体对象信息
     */
    @Override
    public List<HlBandwidth> selectList(HlBandwidth hlBandwidth) {
        LambdaQueryWrapper<HlBandwidth> hlBandwidthWrapper = new LambdaQueryWrapper<>();
        hlBandwidthWrapper.like(HlBandwidth::getBandwidthAffiliation, hlBandwidth.getBandwidthAffiliation());
        return hlBandwidthMapper.selectList(hlBandwidthWrapper);
    }


    /**
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */


    /**
     * 查询带宽
     * 
     * @param bandwidthId 带宽主键
     * @return 带宽
     */
    @Override
    public HlBandwidth selectHlBandwidthByBandwidthId(Long bandwidthId)
    {
        return hlBandwidthMapper.selectHlBandwidthByBandwidthId(bandwidthId);
    }

    /**
     * 查询带宽列表
     * 
     * @param hlBandwidth 带宽
     * @return 带宽
     */
    @Override
    public List<HlBandwidth> selectHlBandwidthList(HlBandwidth hlBandwidth)
    {
        return hlBandwidthMapper.selectHlBandwidthList(hlBandwidth);
    }

    /**
     * 新增带宽
     * 
     * @param hlBandwidth 带宽
     * @return 结果
     */
    @Override
    public int insertHlBandwidth(HlBandwidth hlBandwidth)
    {
        return hlBandwidthMapper.insertHlBandwidth(hlBandwidth);
    }

    /**
     * 修改带宽
     * 
     * @param hlBandwidth 带宽
     * @return 结果
     */
    @Override
    public int updateHlBandwidth(HlBandwidth hlBandwidth)
    {
        return hlBandwidthMapper.updateHlBandwidth(hlBandwidth);
    }

    /**
     * 批量删除带宽
     * 
     * @param bandwidthIds 需要删除的带宽主键
     * @return 结果
     */
    @Override
    public int deleteHlBandwidthByBandwidthIds(Long[] bandwidthIds)
    {
        return hlBandwidthMapper.deleteHlBandwidthByBandwidthIds(bandwidthIds);
    }

    /**
     * 删除带宽信息
     * 
     * @param bandwidthId 带宽主键
     * @return 结果
     */
    @Override
    public int deleteHlBandwidthByBandwidthId(Long bandwidthId)
    {
        return hlBandwidthMapper.deleteHlBandwidthByBandwidthId(bandwidthId);
    }
}
